import numpy as np
import matplotlib.pyplot as plt
def _mesh_mat(mat):
    # 创建网格坐标
    x = np.arange(mat.shape[1])
    y = np.arange(mat.shape[0])
    X, Y = np.meshgrid(x, y)
    Z = mat

    # 绘制网格图
    fig = plt.figure()
    ax = fig.add_subplot(111, projection='3d')
    ax.plot_surface(X, Y, Z, cmap='viridis')

    # 设置标题和标签
    ax.set_title('Matrix')
    ax.set_xlabel('X')
    ax.set_ylabel('Y')
    ax.set_zlabel('Z')

    plt.show()